import { Component, OnInit ,Input} from '@angular/core';
import {InheritBasePagComponent} from '../inherit-base-pag/inherit-base-pag.component'

@Component({
  selector: 'inherit-extd-pag',
  template: `
    <h2>{{ title }}</h2>
    <button (click)="previousPage()" [disabled]="!hasPrevious()" 
        href="javascript:void(0)">
        {{previousText}}
      </button> 
      <span>{{ page }} / {{ pageCount }}</span>
      <button (click)="nextPage()" [disabled]="!hasNext()"
        href="javascript:void(0)" >
        {{nextText}}
    </button>
  `,
  styles: []
})
export class InheritExtdPagComponent extends InheritBasePagComponent implements OnInit {

  // constructor() { }
  @Input() previousText = '<<'; // override default text
  @Input() nextText = '>>'; // override default text
  @Input() title:string='inherit extd page'
  ngOnInit() {
  }

}
